<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1 {
            width: 150px;
            height: 150px;
            border: 1px solid #000;
            background: #EDB21C;
        }
    </style>
</head>
<body>
<div id="d1" onclick="changeDiv(this)"> <!--this 是实际参数 指的就是这个div -->

</div>

</body>
<script>
    function changeDiv(obj) { //形参
        obj.style.width = "400px";
        obj.style.height = "400px"
        obj.style.background = "pink"
    }
</script>
</html>